package com.funtl.screw.common.security.annotation;

import com.funtl.screw.common.security.component.ServiceResourceServerAutoConfiguration;
import com.funtl.screw.common.security.component.ServiceSecurityBeanDefinitionRegistrar;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 资源服务注解
 *
 * <p>Title </p>
 * <p>Description  </p>
 *
 * @author Lusifer
 * @version 1.0.0
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({ServiceResourceServerAutoConfiguration.class, ServiceSecurityBeanDefinitionRegistrar.class})
public @interface EnableServiceResourceServer {
}
